#ifndef PLST_H
#define PLST_H
#include <QtGui>
#include <wchar.h>
#define FIELDS_NUM 7
typedef struct s_pl_tag
{
    unsigned year;
    unsigned trackno;
    QString fname;
    QString artist;
    QString album;
    QString genre;
    QString title;
    QString comment;
} pl_tag;

class plst : public QListWidget
{
    Q_OBJECT
public:
    plst(QWidget *widget);
    QString get_file_name(void);
    QString get_file_byid(int id);
    char *qs2char(QString str);
    char *QString2char(QString str);
    void delete_selected(void);
    void add_fileqs(QString fname);
    ~plst(void);
public slots:
    void slot_file_open(void);
    void slot_dir_open(void);
    void slot_dir_add(void);
    void slot_playlist_open(void);
    void slot_playlist_add(void);
    void slot_playlist_save(void);
    void slot_file_add(void);
private:
    Q_DISABLE_COPY(plst)
    QByteArray bs;
    QTableWidget *tgs_wgt;
    QVector<pl_tag> tgs_lst;
    QImage *cover_image;
    QGraphicsView *cover_view;
    QGraphicsScene *cover_scene;
    void tgs_wgt_init(void);
    void cover_init(void);
    void add_files(QStringList *lst);
};

#endif // PLST_H
